package com.star.uc.api;

import com.star.common.core.contract.R;
import com.star.uc.biz.SmsBizService;
import com.star.uc.contract.dto.request.SmsSendRequest;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 短信
 *
 * @author zhouhengzhe
 * @version 1.0
 * @date 2023/10/19 18:05
 */
@RestController
@RequestMapping("/user/sms")
@RequiredArgsConstructor
@Tag(name = "SmsController", description = "短信")
public class SmsController {

    private final SmsBizService smsBizService;
    /**
     * 获取短信，邮件验证码（多语言）
     */
    @PostMapping("/sendSms")
    public R<String> sendSms(@RequestBody SmsSendRequest smsSendRequest) {
        smsBizService.sendSms(smsSendRequest);
        return R.ok();
    }

}
